package com.hcb.micro.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hcb.micro.dao.interfaceClass.CityMapper;
import com.hcb.micro.dto.City;
import com.hcb.micro.service.ICityService;

@Service("CityService")
public class CityServiceImpl implements ICityService {

	@Autowired
	CityMapper cityMapper;
	
	@Override
	public int deleteByPrimaryKey(Integer id) {
		return cityMapper.deleteByPrimaryKey(id);
	}

	@Override
	public int insert(City record) {
		return cityMapper.insert(record);
	}

	@Override
	public int insertSelective(City record) {
		return cityMapper.insertSelective(record);
	}

	@Override
	public City selectByPrimaryKey(Integer id) {
		return cityMapper.selectByPrimaryKey(id);
	}

	@Override
	public int updateByPrimaryKeySelective(City record) {
		return cityMapper.updateByPrimaryKeySelective(record);
	}

	@Override
	public int updateByPrimaryKey(City record) {
		return cityMapper.updateByPrimaryKey(record);
	}


	@Override
	public City selectByCityId(Integer cityId) {
		return cityMapper.selectByCityId(cityId);
	}

	@Override
	public List<City> selectByProvinceId(Integer provinceId) {
		return cityMapper.selectByProvinceId(provinceId);
	}

	@Override
	public List<City> selectAll() {
		return cityMapper.selectAll();
	}

}
